package com.springmvc.controller;


import com.springmvc.entity.User;
import com.springmvc.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@RequestMapping("/")
@Controller
public class HelloController {
    @Autowired
    private UserService userService;
    @RequestMapping("/")
    public String OneSsm(){
        List<User> users = userService.queryAll();
        System.out.println(users);
        return "index";
    }
}
